<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>后台管理系统</title>
    <meta name="author" content="DeathGhost" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/style.css" />
    <script src="__PUBLIC__/admin/js/html5.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.js"></script>
    <script src="__PUBLIC__/admin/js/jquery.mCustomScrollbar.concat.min.js"></script>
</head>
<body>
<!--页头-->
<header>
    <h1><img src="__PUBLIC__/admin/images/669966.jpg"/></h1>
    <ul class="rt_nav">
        <li><a href="https://www.baidu.com/" target="_blank" class="website_icon">站点首页</a></li>
        <li><a href="adminshow" class="admin_icon">个人信息</a></li>
        <li><a href="#" class="set_icon">账号设置</a></li>
        <li><a href="admin" class="quit_icon">安全退出</a></li>
    </ul>
</header>
<aside class="lt_aside_nav content mCustomScrollbar">
    <h2><a href="admin">起始页</a></h2>
    <ul>
        <li>
            <dl id="dl">
            </dl>
        </li>

        <li>

            <p class="btm_infor">© bindashi集团 版权所有</p>
        </li>
    </ul>
</aside>
<div class="cont_col_rt">
    <iframe  frameborder="0" width="100%" name="center" height="800px"></iframe>
</div>
</body>
</html>
<!--权限列表-->
<script type="text/javascript">
    $(document).ready(function(){
        $.ajax({
            url: "{:url('admin/listp')}",
            dataType:'json',
            success: function(e){
                console.log(e);
                if (e.code==4003){
                    alert(e.msg)
                    location.href="admin"
                }else{
                    $(e.power).each(function (k,v) {
                      if(v.level==0){
                          $("#dl").append('<dt class="" ><a href="#" target="center" class="aa">'+v.name+'</a></dt>')
                      }else{
                          $("#dl").append('<dt class="" ><a href="'+v.description+'" class="aa" target="center">'+v.name+'</a></dt>')

                      }
                    })
                }
            }
        });
    });

</script>
<!--折叠-->
<script>
    $('#dl dt').click(function(){
        $(this).nextUntil('dt').toggle();

    })
</script>
